package com.aket.accesos.directos;

import android.net.Uri;
import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class AccesosDirectosActivity extends Activity {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_accesos_directos);
        
        View Bmaps = (Button) findViewById(R.id.bmaps);
        View Bplay = (Button) findViewById(R.id.bplay);
        View Bmail = (Button) findViewById(R.id.bmail);
        View Bplus = (Button) findViewById(R.id.bplus);
        Bmaps.setOnClickListener(new OnClickListener() 
        {

            @Override
            public void onClick(View v) 
            {
            	Intent browserIntent = 
            		new Intent(Intent.ACTION_VIEW, 
            				Uri.parse("https://maps.google.es/maps?hl=es&tab=wl"));
            	startActivity(browserIntent);
            }
        });
        
        
        
        		Bplay.setOnClickListener(new OnClickListener() 
        {

            @Override
            public void onClick(View v) 
            {
            	Intent browserIntent = 
            		new Intent(Intent.ACTION_VIEW, 
            				Uri.parse("https://play.google.com/store?hl=es&tab=w8"));
            	startActivity(browserIntent);
            }
        });
        
        
        
                Bmail.setOnClickListener(new OnClickListener() 
        {

            @Override
            public void onClick(View v) 
            {
            	Intent browserIntent = 
            		new Intent(Intent.ACTION_VIEW, 
            				Uri.parse("https://accounts.google.com/ServiceLogin?service=mail&passive=true&rm=false&continue=https://mail.google.com/mail/&ss=1&scc=1&ltmpl=default&ltmplcache=2&hl=es"));
            	startActivity(browserIntent);
            }
        });
        
        
        
                Bplus.setOnClickListener(new OnClickListener() 
        {

            @Override
            public void onClick(View v) 
            {
            	Intent browserIntent = 
            		new Intent(Intent.ACTION_VIEW, 
            				Uri.parse("https://accounts.google.com/ServiceLogin?service=oz&continue=https://plus.google.com/?gpsrc%3Dogpy0%26tab%3DwX%26gpsrc%3Dogpy0&hl=es"));
            	startActivity(browserIntent);
            }
        });
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.activity_accesos_directos, menu);
        return true;
    }
}
